<script>
  {
    class A { }
    console.assert(new A() instanceof Object === true)
  }
  {
    class A { }
    class B extends A { }
    console.assert(new B() instanceof A === true)
    console.assert(new B() instanceof Object === true)
  }
  {
    class NullClass { }
    class Object extends NullClass { }
    let nullInstance = new NullClass()
    console.assert(nullInstance instanceof Object === false)
  }
  {
    class A { }
    class B extends A { }
    console.assert(new B() instanceof A === true)
  }
  {
    class A { }
    class B extends A { }
    class C extends B { }
    console.assert(new C() instanceof A === true)
  }

  {
    class A { }
    class B extends A { }
    console.assert(new B() instanceof A === true)
  }
  {
    class A { }
    class B extends A { }
    {
      const isIt = A.isPrototypeOf(B)
      console.assert(isIt === true)
    }
    {
      const proto = new B()
      // Remember: don't touch the assert!!! :)
      console.assert(A.prototype.isPrototypeOf(proto) === true)
    }
  }

  {
    class A { }
    class B extends A { }
    console.assert(new B() instanceof A === true)
  }
  {//不会
    const returnParent = (beNull) => (beNull ? null : class { })
    class B extends returnParent { }
    console.assert(Object.getPrototypeOf(B.prototype) === null)
  }
</script>